home *** CD-ROM | disk | FTP | other *** search
/ HTBasic 9.3 / HTBasic 9.3.iso / 93win / data1.cab / DLL_Toolkit / Source / HTBKnob / DialogThread.cpp next >
Encoding:
C/C++ Source or Header  |  2005-03-02  |  1.6 KB  |  78 lines

  1. /***************************************
  2. HTBKnob.dll
  3.  
  4. DialogThread.cpp
  5.  
  6. Copyright TransEra Corporation 1999
  7. ***************************************/
  8.  
  9. #include "stdafx.h"
  10. #include "HTBknob.h"
  11. #include "DialogThread.h"
  12. #include "KnobDlg.h"
  13.  
  14. #ifdef _DEBUG
  15. #define new DEBUG_NEW
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18.  
  19. #endif
  20.  
  21.  
  22. extern KnobDlg * g_KnobVar;                                // used to hold pointer to dialog box outside of new thread
  23.  
  24. IMPLEMENT_DYNCREATE(DialogThread, CWinThread)
  25.  
  26. DialogThread::DialogThread() 
  27. {    
  28.  
  29. }
  30.  
  31. DialogThread::~DialogThread() 
  32. {
  33.  
  34. }
  35. /////////////////////////////////////////////////////////////////////////////
  36. /*
  37.     Function:        DialogThread::InitInstance
  38.  
  39.     Description:    Displays Dialog Box.    
  40.  
  41.     Return type:    BOOL 
  42.  
  43.     Notes:            Calls GraphDlg class and does a modal on that class
  44.                     thus bringing that defined dialog box into view and 
  45.                     use.        
  46. */
  47. BOOL DialogThread::InitInstance() 
  48. {        
  49.     KnobDlg Dlg;                                        // dialog box
  50.     g_KnobVar = &Dlg;                                    // save pointer to new dialog box for use outside this thread
  51.     Dlg.DoModal();                                        // put in on the screen
  52.     return TRUE;
  53. }
  54.  
  55. /////////////////////////////////////////////////////////////////////////////
  56. /*
  57.     Function:        DialogThread::ExitInstance
  58.  
  59.     Description:    Returns Thread for shut down
  60.  
  61.     Return type:    int 
  62.  
  63.     Notes:            Returns Thread for shut down
  64.         
  65. */
  66. int DialogThread::ExitInstance() 
  67. {    
  68.     return CWinThread::ExitInstance();
  69. }
  70.  
  71. BEGIN_MESSAGE_MAP(DialogThread, CWinThread)
  72.     //{{AFX_MSG_MAP(DialogThread)
  73.         // NOTE - the ClassWizard will add and remove mapping macros here.
  74.     //}}AFX_MSG_MAP
  75. END_MESSAGE_MAP()
  76.  
  77.  
  78.